home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperHackers.cpt / Hyper-Hackers Queue 1.0 / card_36412.txt < prev    next >
Text File  |  1989-02-26  |  3KB  |  77 lines

  1. -- card: 36412 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3797
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 1
  9. ----- text -----
  10.  
  11. From: woody@tybalt.caltech.edu (William Edward Woody)
  12.  
  13. Date: 10 Mar 88 10:17:55 GMT
  14.  
  15.  
  16. >Hypercard makes use of a new print manager call PrGeneral which is documented
  17. >in IM V-410.  It is present in Imagewriter drivers >= 2.5 and LaserWriter
  18. >drivers >= 4.0, and not in any third party drivers (including SoftStyle's HP
  19. >Thinkjet driver that I have). 
  20.  
  21. >Any drivers that intend for Hypercard to use them MUST implement the PrGeneral 
  22. >call.
  23.  
  24. (To PUGH@NMFECC.ARPA:  Please don't sound so rightous about something
  25. you don't completely understand.  Had I had not known better, I would
  26. have wasted several hours following your advice down the wrong trail...
  27. It's late, so please excuse me if this sounds negative...)
  28.  
  29. Uh, (1) Yes, Hypercard makes use of the new print manager call PrGeneral
  30. documented (incompletely-I used MacNosy to figger out the lil' bugger...)
  31. in IM V-410, and (2) the lack of PrGeneral is not what's making Hypercard
  32. go belly up.  It's the fact that PrDrvrVers() (IM II-163) is returning
  33. 0 for every third party driver I've seen, including mine, until Now!
  34. And (as it turns out), if you (1) do set the version number correctly (see
  35. below) in your printer driver, and (2) you DON'T implement PrGeneral AT ALL
  36. (PDEF 7 doesn't even exist!), Hypercard WILL PRINT CORRECTLY.  (Gosh, I'm
  37. so supprised.)  It's almost as if Hypercard isn't looking for PrGeneral...
  38.  
  39. What's going on is this:  Hypercard calls PrDrvrVers() to get the version
  40. number of the driver, and checks to see if it is greater than or equal to
  41. the constant iPrRelease.  Most third party compiler developers don't know
  42. how to extract PrDrvrVers(), so they don't implement the routine in their
  43. runtime support libraries, but (as Apple has their finger in the pie) MPW
  44. does.
  45.  
  46. For Third Party Compiler Developers:  How to write PrDrvrVers() glue:
  47. Open the printer driver in question.  Now, get the DCtlEntry for that
  48. driver.  (IM II-190).  Now, get the low-order byte of the
  49. dCtlQHdr.qFlags field in the DCtlEntry.  The low-order byte is the version.
  50. Return version number.
  51.  
  52. For Third Party Printer Driver developers:  How to set the PrDrvrVers() val:
  53. When your driver gets the Open call, somewhere during your driver open
  54. routine, get your DCtlEntry, and place the version (at least 25 to fool,
  55. er, ah, indicate to Hypercard to use your driver) into the low byte
  56. of the dCtlQHdr.qFlags field.
  57.  
  58. The version number for the printer driver is placed in the low order
  59. byte of the DCtlEntry.dCtlQHdr.qFlags field.  It says so right here,
  60. buried in the middle of the first paragraph under the subject "The Driver
  61. I/O Queue" in the Device Manager documentation. [IM II-191].  Obscure,
  62. no?
  63.  
  64. How did I ever figure this out?  I took MacNosy to the _PrLink glue in
  65. MPW, that's how!
  66.  
  67. Sorry if this is long and confusing, but it's late.  I posted this
  68. in the .Hypercard group because this is where the discussion started,
  69. and into the programmer's group because this is where the discussion
  70. belongs.  Please follow up only in the programmer's group for any
  71. more techno mumbo about drivers.
  72.  
  73.  
  74.  
  75. -- part contents for background part 45
  76. ----- text -----
  77. Re: Usenet answers (PrGeneral & ID 02s)